package org.future.esb;

import java.util.ArrayList;
import java.util.List;

/**
 *@date   2010-4-12 下午03:07:42
 *@author dycc
 *@file   org.future.esb.Inbound.java
 */
public class Inbound {
	private String tagName = "inbound";
	private List<InboundEndpoint> inboundEndpoints = new ArrayList<InboundEndpoint>();
	private List<Router> routers = new ArrayList<Router>();
	/**
	 * toString
	 */
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("<" + tagName);
		sb.append(">");
		sb.append("\r\n");
		// add childs
		for(int i=0;i<inboundEndpoints.size();i++){
			sb.append(inboundEndpoints.get(i));
			sb.append("\r\n");
		}
		for(int i=0;i<routers.size();i++){
			sb.append(routers.get(i));
			sb.append("\r\n");
		}
		// add end element
		sb.append("</" + tagName + ">");
		return sb.toString();
	}
	
	public String getTagName() {
    	return tagName;
    }
	public void setTagName(String tagName) {
    	this.tagName = tagName;
    }
	public List<InboundEndpoint> getInboundEndpoints() {
    	return inboundEndpoints;
    }
	public void setInboundEndpoints(List<InboundEndpoint> inboundEndpoints) {
    	this.inboundEndpoints = inboundEndpoints;
    }
	public List<Router> getRouters() {
    	return routers;
    }
	public void setRouters(List<Router> routers) {
    	this.routers = routers;
    }
	
}
